package com.boil.qz.safekavass.web.request.param;

import com.boil.util.Constants;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;

/**
 * Created by ChenYong on 2017-04-19.
 * <br>
 * 首页广告是否显示的请求参数。
 */
public class HomeAdvertIsShowParam {
    /**
     * 广告 ID 拼接的字符串
     */
    @NotBlank(message = "广告ID拼接的字符串不能为空")
    @Pattern(regexp = Constants.NUMBER_STR_SPLIT_RE, message = "广告ID拼接的字符串格式不正确")
    private String ids;
    /**
     * 广告是否显示
     */
    @NotBlank(message = "广告是否显示不能为空")
    @Length(min = Constants.VALUE_1, max = Constants.VALUE_1, message = "广告是否显示的长度为一个字符")
    @Pattern(regexp = Constants.NUMBER_EMPTY_RE, message = ("广告是否显示" + Constants.NUMBER_RE_MSG))
    private String isShow;

    /**
     * 默认构造器。
     */
    public HomeAdvertIsShowParam() {
        super();
    }

    public String getIds() {
        return ids;
    }

    public void setIds(String ids) {
        this.ids = ids;
    }

    public String getIsShow() {
        return isShow;
    }

    public void setIsShow(String isShow) {
        this.isShow = isShow;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("HomeAdvertIsShowParam{");
        sb.append("ids='").append(ids).append('\'');
        sb.append(", isShow='").append(isShow).append('\'');
        sb.append('}');
        return sb.toString();
    }
}